package bb.lanxing.lib.devices.sprint.utils;

import bb.lanxing.lib.devices.api.DeviceManager;
import bb.lanxing.lib.devices.core.utils.DeviceHelper;
import bb.lanxing.lib.devices.sprint.SprintDeviceManager;
import bb.lanxing.lib.devices.sprint.XossDeviceController;
import bb.lanxing.util.Log;

public final class DeviceControllerHelper {
    private static final String TAG = "DeviceControllerHelper";
    public static XossDeviceController getXossDeviceController(String address) {
        DeviceManager deviceManager = DeviceHelper.getDeviceManager();
        if (!(deviceManager instanceof SprintDeviceManager)) {
            return null;
        }
        return ((SprintDeviceManager) deviceManager).getXossDeviceController(address);
    }
/*
**/
    public static XossDeviceController getXossDeviceController(String address, String name, int type) {
        DeviceManager deviceManager = DeviceHelper.getDeviceManager();
        if (!(deviceManager instanceof SprintDeviceManager)) {
            Log.d("wangsm_bt"," getXossDeviceController ,return null ");
            return null;
        }
        Log.d("wangsm_bt"," getXossDeviceController ,get XossDevice contrller ");
        return ((SprintDeviceManager) deviceManager).getXossDeviceController(address, name, type);
    }

    public static boolean isInternationalVersion(String str) {
        return (str != null ? str.trim() : "").endsWith("V1.0.5");
    }
}
